#include "stdafx.h"
#include "TestDecorator.h"

namespace JHCPP{
	namespace CppUnit{

		CTestDecorator::CTestDecorator(CTest* test)
		{
			m_test = test;
		}

		CTestDecorator::~CTestDecorator()
		{
			if (m_test)
			{
				delete m_test;
				m_test = NULL;
			}
		}

		int CTestDecorator::countTestCases()
		{
			return m_test->countTestCases();
		}

		void CTestDecorator::run(CTestResult* result)
		{
			m_test->run(result);
		} 

		std::string CTestDecorator::toString()
		{
			return m_test->toString();
		}

	}//end of namespace CppUnit
}//end of namespace JHCPP
